1. Field of the Invention
The present invention relates to a numerical controller, and more particularly to a numerical controller for carrying out machining program checks and stroke limit checks.
2. Description of Related Art
Numerical controllers having a program check function are known in the art. When carrying out machining with this type of numerical controller, the format of the machining program and stroke limits are checked before actual machining, to ensure that the program works properly, and then the machining is actually performed.
FIG. 7 is a flowchart exemplifying a machining simulation check executed by a controller of a numerical controller.
An MPU, which is provided in the controller, analyzes a read program (Step S100), then performs an acceleration/deceleration process before interpolation by means of a specified time constant, as well as a velocity process by means of a specified velocity (Step S101), and performs an interpolation process (Step S102).
It is then determined whether or not machine lock is specified. A machine lock state can be discriminated, for example, by determining whether or not a machine lock command is included in the NC data (Step S103). The machine lock denotes an operation wherein the programmed operation is continued while nullifying the axis movement resulting from the interpolation process, thereby retaining machine motion axes as controlled objects in immovable state.
In the case of non-machine lock, machine coordinates are updated using the axis motion amount obtained by the interpolation (Step S105), and based on the updated machine coordinates, stroke limit check is performed (Step S106).
In the case of the machine lock, the axis motion amount obtained by the interpolation is nullified and the programmed operation alone is continued, so that the machine motion axis as the controlled object does not move (Step S104). Specifically, in this case, movable parts of a machine tool are stopped and brought into a machine lock state by nullifying the axis motion amount obtained by the interpolation and outputting pulses of zero to a servo control section. While in the machine lock state, program coordinates are updated (Step S105′). The program coordinates are coordinates whose origin is defined by the machining program. In the machine lock state, machining is simulated based on the program coordinates (Step S106′). Then, acceleration/deceleration after interpolation is performed according to a specified time constant (Step S107).
A numerical controller for simulating machining is disclosed, for example, in JP07-49709A.
There has also been proposed a numerical controller for drawing a tool path to permit a program executed by the numerical controller to be checked before machining. As such numerical controller, a device disclosed in JP10-124124A, for example, is known.
FIG. 8 exemplifies the configuration of a numerical controller with a drawing function whereby a tool path is drawn at display means to permit program check.
The numerical controller 200 comprises a machining program analyzing section 201 for analyzing a machining program, a block processing section 202 for executing individual blocks of the analyzed machining program, and a servo control section 204 for controlling the operation of a servomotor 206 through a driving section (servo amplifier) 205 in accordance with motion command data from the block processing section 202. The numerical controller further comprises a display control section 208 for reading coordinates, which are position data, from the servo control section 204 to draw a tool path at a display device 209.
By inputting a machine lock command or a dry run command to the servo control section 204, it is possible to enable a machine lock function which allows the controlled axis to run idle without moving, or a dry run function which permits the feed rate to be set manually without regard to the programmed velocity. Owing to these functions, a tool path can be drawn without entailing movement of the controlled axis or movable parts of the numerical controller, in disregard of the programmed velocity.
The program is checked in the machine lock state at a dry run velocity, without accompanying axis movement. Usually, for such program check, the dry run velocity is set at a low velocity. The program check is also performed with respect to acceleration/deceleration control by executing same. Thus, since the program is run at a low dry run velocity while executing the acceleration/deceleration control, a problem arises in that the program check requires a long time.
Also, in the machine lock state, the controlled axis is not moved and only the position display thereof is changed, so that the machine coordinates are not updated. A problem therefore arises in that the stroke limit check (stored stroke check) cannot be performed.
The stroke limit check is a function whereby, if a tool enters a tool entry forbidden area set with respect to the numerical controller, the tool is decelerated and stopped and an alarm is displayed. In the machine lock state, however, since the controlled axis is not moved, it is not possible to determine whether a tool attached to the controlled axis has entered the entry forbidden area or not.